Xceed .NET Libraries Documentation
Xceed.Compression Assembly / Xceed.Compression Namespace / ManagedPPMdCompressor Class / Compress Method / Compress(Byte[],Int32,Int32,Boolean,Stream) Method
An array of bytes to compress. A maximum of count bytes are taken from this array and compressed. Cannot be null.
The byte offset in buffer at which to begin taking the data to compress. Cannot be less than 0.
The maximum number of bytes to be taken from buffer. Cannot be less than 0.
Indicates if this call ends the stream of data to compress.
A Stream containing the compressed data. Cannot be null.


In This Topic
    Compress(Byte[],Int32,Int32,Boolean,Stream) Method
    In This Topic
    Compresses an array of bytes to a Stream.
    Syntax
    'Declaration
     
    Public Overloads Overridable Sub Compress( _
       ByVal buffer() As Byte, _
       ByVal offset As Integer, _
       ByVal count As Integer, _
       ByVal endOfData As Boolean, _
       ByVal compressed As Stream _
    ) 
    'Usage
     
    Dim instance As ManagedPPMdCompressor
    Dim buffer() As Byte
    Dim offset As Integer
    Dim count As Integer
    Dim endOfData As Boolean
    Dim compressed As Stream
     
    instance.Compress(buffer, offset, count, endOfData, compressed)
    public virtual void Compress( 
       byte[] buffer,
       int offset,
       int count,
       bool endOfData,
       Stream compressed
    )

    Parameters

    buffer
    An array of bytes to compress. A maximum of count bytes are taken from this array and compressed. Cannot be null.
    offset
    The byte offset in buffer at which to begin taking the data to compress. Cannot be less than 0.
    count
    The maximum number of bytes to be taken from buffer. Cannot be less than 0.
    endOfData
    Indicates if this call ends the stream of data to compress.
    compressed
    A Stream containing the compressed data. Cannot be null.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also